package com.sunny.excel.enumeration;

import lombok.Getter;

/**
 * @Author:shucq
 * @Description:
 * @Date 2019/10/25 10:07
 */
@Getter
public enum FieldOrder {
    DESC("desc"),
    ASC("asc"),
    DEFAULT_ORDER("desc"),
    ;
    private String order;

    FieldOrder(String order) {
        this.order = order;
    }

    public static String getOrder(FieldOrder order) {
        return order == null ? DEFAULT_ORDER.getOrder() : order.getOrder();
    }
}